package com.pi.base.service;
import java.text.DecimalFormat;
import java.util.List;

import org.springframework.transaction.annotation.Transactional;

@Transactional
public class BaseService<T> {
	
	@SuppressWarnings("hiding")
  public <T extends Object> T getSingelFromList(List<T> list){
		if(list == null || list.size() == 0){
			return null;
		}
		return list.get(0);
	}
	
	
	public String double2Str(double d){
		DecimalFormat df=new DecimalFormat("#######0.00");
		return df.format(d);
	}

}
